import bus from "@/bus";
import {
  renderButton
} from '@/util';
let data = {
  status: 'pass',
  totalItem: 0,
  pageSize: window.$pageSize,
  currentPage: 1,
  statistics: {},
  form: {
    year: '' + new Date().getFullYear(),
    distributorName: "",
    provinceId: "", //省份列表
    yearList: [
      {
        id: 0,
        year: "2015"
      },
      {
        id: 1,
        year: "2016"
      },
      {
        id: 2,
        year: "2017"
      },
      {
        id: 3,
        year: "2018"
      },
      {
        id: 4,
        year: "2019"
      },
      {
        id: 5,
        year: "2020"
      },
      {
        id: 6,
        year: "2021"
      },
      {
        id: 7,
        year: "2022"
      },
      {
        id: 8,
        year: "2023"
      },

      {
        id: 9,
        year: "2024"
      },
      {
        id: 10,
        year: "2025"
      }
    ], // 年份
    officeList: [],
    departmentId:'',
    storeName: "",
    storeType: [],
    storeTypeId: "",
    telephone: "",
    storeNo: "",
    linkMan: ""
  },
  columns: [
    {
        title: '门店名称',
        key: 'storeName',
        align: 'left',
        width: 250
    },
    {
      title: '门店类型',
      key: 'storeTypeName',
      align: 'left',
      width: 200
    },
    {
        title: '门店编号',
        key: 'storeNo',
        align: 'left',
        width: 200
    },
    {
        title: '老板名称',
        key: 'linkMan',
        align: 'left',
        width: 200
    },
    {
        title: '联系电话',
        key: 'telephone',
        align: 'left',
        width: 200
    },
    {
      title: '上级经销商',
      key: 'distributorName',
      align: 'left',
      width: 250
    },
    {
      title: '省份',
      key: 'provinceName',
      align: 'left',
      width: 200
    },
    {
      title: '科室',
      key: 'departmentName',
      align: 'left',
      width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '上年结余'),
                h('Icon', {
                    props: {
                    type: 'ios-help-circle',
                    size: 18
                    }
                })
            ])
            return h('Tooltip', {
                props: {
                    content: '上一年年末时剩余的返利金额(元)',
                    placement: 'top',
                    transfer: true
                }
            }, [inner])
        },
        key: 'lastYearRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
              h('span', '结余已用'),
              h('Icon', {
                props: {
                  type: 'ios-help-circle',
                  size: 18
                }
              })
            ])
            let slot = h('div', {
              slot: 'content'
            }, [
              h('p', '上一年年末时剩余的返利，'),
              h('p', '在本年度已使用的情况')
            ])
            return h('Tooltip', {
              props: {
                placement: 'top',
                transfer: true
              }
            }, [inner, slot])
        },
        key:'currentUsedRebate',
        align: 'right',
        width: 200,
        render: (h, params) => {
        return ( <div > {
          h('span', {
              style: {
                  color: '#21a4ff',
                  'margin-right':'10px'
              }
          },params.row.currentUsedRebate)
          }
          {
            renderButton(h, { text: '查看', type: 'primary' },
              () => { bus.$emit("openDetail", params.row)})
          } 
        </div>
        )
      }
    },
    {
        title: '本年获得返利合计',
        key: 'currentYearRebateTotal',
        align: 'right',
        width: 200
    },
    {
        title: '本年获得安装费合计',
        key: 'currentYearInstallFreeTotal',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
              h('span', '返利余额'),
              h('Icon', {
                props: {
                  type: 'ios-help-circle',
                  size: 18
                }
              })
            ])
            return h('Tooltip', {
              props: {
                content: '本年度门店的返利余额',
                placement: 'top',
                transfer: true
              }
            }, [inner])
        },
        key: 'currentRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '1月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'januaryRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '1月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'januaryUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '1月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'januaryInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '2月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'februaryRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '2月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'februaryUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '2月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'februaryInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '3月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'marchRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '3月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'marchUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '3月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'marchInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '4月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'aprilRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '4月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'aprilUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '4月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'aprilInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '5月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'mayRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '5月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'mayUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '5月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'mayInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '6月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'juneRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '6月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'juneUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '6月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'juneInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '7月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'julyRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '7月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'julyUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '7月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'julyInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '8月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'augustRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '8月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'augustUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '8月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'augustInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '9月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'septemberRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '9月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'septemberUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '9月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'septemberInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '10月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'octoberRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '10月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'octoberUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '10月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'octoberInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '11月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'novemberRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '11月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'novemberUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '11月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'novemberInstallFree',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '12月返利'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'decemberRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '12月使用'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份使用的返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'decemberUsedRebate',
        align: 'right',
        width: 200
    },
    {
        renderHeader: (h, p) => {
            let inner = h('div', [
                h('span', '12月安装费'),
                h('Icon', {
                props: {
                    type: 'ios-help-circle',
                    size: 18
                }
                })
            ])
            return h('Tooltip', {
                props: {
                content: '该月份获得的安装费返利',
                placement: 'top',
                transfer: true
                }
            }, [inner])
        },
        key: 'decemberInstallFree',
        align: 'right',
        width: 200
    }
],
 data:[{}],


}
export default data;
